package com.cfushn.ddd.mp.generator;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * MpGeneratorArgs
 *
 * @author CFuShn 2023/3/29 10:05
 */
@Data
@Accessors(chain = true)
public class MpGeneratorArgs {

    /** 举栗: "jdbc:mysql://101.227.53.202:3306/mysql?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai" */
    private String url;

    private String username;

    private String password;

    /** 与执行生成器的项目目录的相对地址,(举栗: 跟当前项目平级的xxx项目模块,这里就写 "../xxx" ) */
    private String relativePathPrefix;

    /** 父包名, (如 "com.open.capacity.csp.infrastructure" ) */
    private String parentPackageName;

    /** 实体类包名 (建议使用 "po") */
    private String entityPackageName = "po";

    /** dao包名 (建议使用 "dao" , 如果使用mapper容易mapstruct之类的mapper混淆) */
    private String mapperPackageName = "dao";

    /** service包名 (建议使用 "daoservice", 与业务service区分开, 且里面也不建议再写业务sql) */
    private String servicePackageName = "daoservice";

    /** serviceImpl包名 (建议使用 "daoservice.impl") */
    private String serviceImplPackageName = "daoservice.impl";

    /** entity后缀 */
    private String entityFileSuffix = "Po";

    /** mapper后缀 */
    private String mapperFileSuffix = "Dao";

    /** service后缀 */
    private String serviceFileSuffix = "DaoService";

    /** serviceImpl后缀 */
    private String serviceImplFileSuffix = "DaoServiceImpl";

    public MpGeneratorArgs(String url, String username, String password, String relativePathPrefix, String parentPackageName) {
        this.url = url;
        this.username = username;
        this.password = password;
        this.relativePathPrefix = relativePathPrefix;
        this.parentPackageName = parentPackageName;
    }

}
